#!/bin/bash

GPROF_BIN="/usr/bin/gprof"
HW1_DIR="/homes/a/abbasmus/courses/454ece/hw1"

pushd $HW1_DIR
for executable in vpr_gprof*; do
    echo $executable ""
    
    rm -rfv gmon.out
    
    $executable iir1.map4.latren.net k4-n10.xml place.out route.out -nodisp -place_only -seed 0
    
    $GPROF_BIN $executable gmon.out | tee "$executable.gprof"
done
popd
